﻿Public Class MySQLErro


    Public Shared Function ChecaErro(ByVal MySQLerro As MySql.Data.MySqlClient.MySqlException) As Boolean


        Select Case MySQLerro.ErrorCode
            Case -2147467259
                MsgBox("Não possivel conectar ao servidor MySQL!", MsgBoxStyle.Exclamation, "Pinguim - Erro na conexão")
                Dim frmConfigConexao As New frmMySQLConexao
                frmConfigConexao.ShowDialog()

                Return True
            Case -2147467258

            Case Else
                Return False
        End Select


    End Function

End Class
